<!-- 相当于给模板定义一个名称 define 和 end 是成对出现的 -->
{{ define "web/home.html" }}

    <!DOCTYPE html>
    <html lang="cn">
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=Edge">
        <meta name="viewport" content="width=device-width,initial-scale=1.0">
        <title>document</title>
        <link rel="stylesheet" href="/static/css/style.css">
    </head>
    <bady>
        <!-- 引入其他的html模板 -->
        {{template "public/page_header.html" .}}

        <h2>{{.title}}</h2>
        <h2>get传参username：{{.username}}</h2>

        <form action="/login" method="post">
            用户名：<input type="text" name="username" /><br>
            密码：<input type="password" name="password" /><br>
            <input type="submit" value="提交">
        </form>

        <br/><br/>
        <form action="/getUser" method="post">
            用户名：<input type="text" name="username" /><br>
            密码：<input type="password" name="password" /><br>
            <input type="submit" value="提交到结构体">
        </form>

        {{template "public/page_footer.html" .}}

    </bady>

    </html>

{{ end }}